<include file="Public:pagerForm" />

<script type="text/javascript">
var bsYear;
var bsDate;
var bsWeek;
var arrLen=8; //数组长度
var sValue=0; //当年的秒数
var dayiy=0; //当年第几天
var miy=0; //月份的下标
var iyear=0; //年份标记
var dayim=0; //当月第几天
var spd=86400; //每天的秒数
function Chen_CAL(){
	c1=new Image(); c1.src="__PUBLIC__/Images/clock/c1.gif";
	c2=new Image(); c2.src="__PUBLIC__/Images/clock/c2.gif";
	c3=new Image(); c3.src="__PUBLIC__/Images/clock/c3.gif";
	c4=new Image(); c4.src="__PUBLIC__/Images/clock/c4.gif";
	c5=new Image(); c5.src="__PUBLIC__/Images/clock/c5.gif";
	c6=new Image(); c6.src="__PUBLIC__/Images/clock/c6.gif";
	c7=new Image(); c7.src="__PUBLIC__/Images/clock/c7.gif";
	c8=new Image(); c8.src="__PUBLIC__/Images/clock/c8.gif";
	c9=new Image(); c9.src="__PUBLIC__/Images/clock/c9.gif";
	c0=new Image(); c0.src="__PUBLIC__/Images/clock/c0.gif";
	cb=new Image(); cb.src="__PUBLIC__/Images/clock/cb.gif";
	showtime();
    init();
    e2c();
    var calen=GetDateString();
    var ccalen=GetcDateString();
    document.getElementById("yangli").innerHTML=calen;
    document.getElementById("nongli").innerHTML=ccalen;
}

function showtime(){
	if (!document.images)
	return;
	var Digital=new Date();
	var h=Digital.getHours();
	var m=Digital.getMinutes();
	var s=Digital.getSeconds();

	if (h<=9){
		document.images.a.src=cb.src;
		document.images.b.src=eval("c"+h+".src");
	}
	else {
	document.images.a.src=eval("c"+Math.floor(h/10)+".src");
	document.images.b.src=eval("c"+(h%10)+".src");
	}
	if (m<=9){
		document.images.d.src=c0.src;
		document.images.e.src=eval("c"+m+".src");
	}
	else {
		document.images.d.src=eval("c"+Math.floor(m/10)+".src");
		document.images.e.src=eval("c"+(m%10)+".src");
	}
	if (s<=9){
		document.g.src=c0.src;
		document.images.h.src=eval("c"+s+".src");
	}
	else {
	document.images.g.src=eval("c"+Math.floor(s/10)+".src");
	document.images.h.src=eval("c"+(s%10)+".src");
	}
	setTimeout("showtime()",1000);
}
</script>
<style type="text/css">
<!--
.unnamed1 {
	font-size: 12px;
	text-decoration: none;
	color: #000000;
}
-->
</style>


<div class="pageHeader">
    <div class="searchBar" style="height:auto;margin:4px auto; width:947px; border:0px solid red; ">
        <div style="width:360px; float:left; border:0px solid black;">
            <div align="center">

                 <if condition="$hasAttendence eq 0">
                    <a href="__URL__/add" target="dialog" mask="true"> <IMG src="__PUBLIC__/Images/daka.gif" height="77"/></a>
                </if>

                 <if  condition="$status eq 1"><div style="color:green; font-size:16px;margin-top:20px; ">今天你准时上班了！</div></if>
                  <if  condition="$status eq 0"><div style="color:red; font-size:19px; margin-top:20px; ">今天你迟到了！</div></if>
            </div>
        </div>

        <div style="width:200px;border:0px solid black; float:left;" align="center">
            <div id="imageclock"><IMG
                    src="__PUBLIC__/Images/clock/cb.gif" name="a" width="18" height="26"><IMG
                    src="__PUBLIC__/Images/clock/cb.gif" name="b" width="18" height="26"><IMG
                    src="__PUBLIC__/Images/clock/colon.gif" name="c" width="18" height="26"><IMG
                    src="__PUBLIC__/Images/clock/cb.gif" name="d" width="18" height="26"><IMG
                    src="__PUBLIC__/Images/clock/cb.gif" name="e" width="18" height="26"><IMG
                    src="__PUBLIC__/Images/clock/colon.gif" name="f" width="18" height="26"><IMG
                    src="__PUBLIC__/Images/clock/cb.gif" name="g" width="18" height="26"><IMG
                    src="__PUBLIC__/Images/clock/cb.gif" name="h" width="18" height="26">
            </div>
            <div id="yangli" style="margin:8px auto; font-size:14px; font-family:'微软雅黑'">
            </div>
            <div id="nongli" style="margin:8px auto; font-size:14px; font-family:'微软雅黑'">
            </div>
            <script language=javascript>Chen_CAL();</script>
        </div>
    </div>
</div>


<div class="pageContent">
    <div class="panelBar">
		<ul class="toolBar">
			<li><a class="edit" href="__URL__/edit/id/{id}/navTabId/__MODULE__" target="dialog" mask="true" warn="请选择考勤日期"><span>编辑备注</span></a></li>
			<li class="line">line</li>
		</ul>
	</div>

	<table class="table" width="100%" layoutH="138">
		<thead>
		<tr>
			<th width="60">编号</th>
			<th width="100" >考勤日期</th>
			<th  width="120">签到时间</th>
			<th width="100">考勤状态</th>
			<th>备注</th>
		</tr>
		</thead>
		<tbody>
		<volist id="vo" name="list" key="k">
			<tr target="id" rel="{$vo['id']}">
				<td>{$k}</td>
				<td>{$vo['attdate']}</td>
				<td>{$vo['workstarttime']}</td>
				<td    <if condition="$vo['status'] eq 1 ">  bgcolor="#adff2f"<else />  bgcolor=red</if>  >
                             <if condition="$vo['status'] eq 1 "> 正常 <else />  迟到</if>
                </td>
				<td>{$vo['notes']}</td>

			</tr>
		</volist>
		</tbody>
	</table>

	<div class="panelBar">
		<div class="pages">
			<span>共{$totalCount}条</span>
		</div>
		<div class="pagination" targetType="navTab" totalCount="{$totalCount}" numPerPage="{$numPerPage}" pageNumShown="10" currentPage="{$currentPage}"></div>
	</div>

</div>


